<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>监控属性，只能监控data中声明 的内容</title>

</head>
<body>


<div id="app">


</div>


<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    let app = new Vue({
            el: "#app",
            data: {
                user: {
                    name: "刘德华",
                    age: 50
                }
            },
            watch: {
                user: {
                    deep: true,
                    handler(val) {
                        console.log(val)
                    }
                }
            }


        })
    ;
</script>
</body>
</html>